<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>评论列表</title>

    <#include "/view/admin/headList.html"/>

</head>
<body>
<div class="table-class">
    <div class="panel panel-default" style="margin: 10px 10px 10px;">
     <div class="panel-body">
        <form class="bs-example bs-example-form" role="form">

            <div class="input-group">
                <span class="input-group-addon">评论内容</span>
                <input type="text" id="content" class="form-control" value="${entity.content!}" placeholder="请输入评论内容">
            </div>
                <span class="bank-label">&nbsp;</span>



            <#--<div class="input-group">
                <span class="input-group-addon">用户</span>
                <select id="userinfoId" name="userinfoId"
                        class="form-control selectpicker"   data-live-search="true"
                >
                    <option value="">请选择用户</option>
                            <#list listUserinfoId as lv>
                                <option value="${lv.value!}"
                                <#if entity.userinfoId??&&entity.userinfoId == lv.value >
                                    selected="selected"
                                </#if>
                                >${lv.name!}</option>
                            </#list>




                </select>

            </div>
                <span class="bank-label">&nbsp;</span>
-->


            <div class="input-group">
                <span class="input-group-addon">评论对象</span>
                <select id="objectType" name="objectType"
                        class="form-control"
                >
                    <option value="">请选择评论对象</option>
                                <option value="0" <#if entity.objectType??&&0 == entity.objectType>selected="selected"</#if>>活动</option>

                                <option value="1" <#if entity.objectType??&&1 == entity.objectType>selected="selected"</#if>>商品</option>


                </select>

            </div>
                <span class="bank-label">&nbsp;</span>


                <div class="input-group">
                    <span class="input-group-addon">是否加入乐拍客</span>
                    <select id="joinlpk" name="joinlpk" class="form-control" >
                        <option value="">请选择是否加入乐拍客</option>
                                    <option value="1" <#if entity.joinlpk??&&1 == entity.joinlpk>selected="selected"</#if>>是</option>
                                    <option value="0" <#if entity.joinlpk??&&0 == entity.joinlpk>selected="selected"</#if>>否</option>
                    </select>
                </div>
                <span class="bank-label">&nbsp;</span>

            <div class="input-group">
                <span class="input-group-addon">审批状态</span>
                <select id="approveStatus" name="approveStatus"
                        class="form-control"
                >
                    <option value="">请选择审批状态</option>
                                <option value="0" <#if entity.approveStatus??&&0 == entity.approveStatus>selected="selected"</#if>>审批中</option>

                                <option value="1" <#if entity.approveStatus??&&1 == entity.approveStatus>selected="selected"</#if>>审批通过</option>

                                <option value="2" <#if entity.approveStatus??&&2 == entity.approveStatus>selected="selected"</#if>>审批不通过</option>


                </select>

            </div>
                <span class="bank-label">&nbsp;</span>


                <div class="input-group">
                    <span class="input-group-addon">开始审批时间</span>
                    <input type="text" id="approveTimeStart" class="form-control isdatetimepicker" value="<#if (entity.approveTimeStart)?? >${entity.approveTimeStart?string('yyyy-MM-dd HH:mm:ss')}</#if>" id="approveTimeStart" name="approveTimeStart" data-date-format="yyyy-mm-dd hh:ii:ss">
                </div>
                <span class="bank-label">&nbsp;</span>
                <div class="input-group">
                    <span class="input-group-addon">结束审批时间</span>
                    <input type="text" id="approveTimeEnd" class="form-control isdatetimepicker" value="<#if (entity.approveTimeEnd)?? >${entity.approveTimeEnd?string('yyyy-MM-dd HH:mm:ss')}</#if>" id="approveTimeEnd" name="approveTimeEnd" data-date-format="yyyy-mm-dd hh:ii:ss">
                </div>
                <span class="bank-label">&nbsp;</span>

                <div class="input-group">
                    <span class="input-group-addon">开始创建时间</span>
                    <input type="text" id="createtimeStart" class="form-control isdatetimepicker" value="<#if (entity.createtimeStart)?? >${entity.createtimeStart?string('yyyy-MM-dd HH:mm:ss')}</#if>" id="createtimeStart" name="createtimeStart" data-date-format="yyyy-mm-dd hh:ii:ss">
                </div>
                <span class="bank-label">&nbsp;</span>
                <div class="input-group">
                    <span class="input-group-addon">结束创建时间</span>
                    <input type="text" id="createtimeEnd" class="form-control isdatetimepicker" value="<#if (entity.createtimeEnd)?? >${entity.createtimeEnd?string('yyyy-MM-dd HH:mm:ss')}</#if>" id="createtimeEnd" name="createtimeEnd" data-date-format="yyyy-mm-dd hh:ii:ss">
                </div>
                <span class="bank-label">&nbsp;</span>



            <div class="input-group" style="text-align: right;">
                <a class="btn btn-info"  href="javascript:query('${base}/czjcomments/list.do')"><span class="glyphicon glyphicon-search"></span> 查找</a>

            </div>
        </form>
     </div>
    </div>




    <table class="table table-hover table-list table-bordered" >
        <thead>

        <tr class="table-head">
            <th style="width: 30px;">序号</th>
                <th class="label-hidden">评论主键</th>
                <th style="width: 300px;">评论内容</th>
                <th>用户</th>
                <th class="label-hidden">评论对象</th>
                <th>评论对象</th>
                <th>是否加入乐拍客</th>
                <th>审批状态</th>
                <th>审批时间</th>
                <th>创建时间</th>
                <th class="label-hidden">删除标识</th>

            <th>操作</th>
        </tr>
        </thead>
        <tbody>
        <#list pagination.list as c>
            <tr>
                <td >${(pagination.pageNo-1)*pagination.pageSize+1+c_index}</td>
                        <td class="label-hidden">${c.commentsId!}</td>
                            <td>${c.content!}</td>


                        <td> 
                            <#if c.userinfoId??>
                                    <#list listUserinfoId as lv>
                                        <#if lv.value??&&c.userinfoId == lv.value >
                                        ${lv.name!}
                                        </#if>
                                    </#list>

                            </#if>


                        </td>
                        <td class="label-hidden">${c.objectId!}</td>
                        <td>

                            <#if c.objectType??>
                                <#if c.objectType==0><a href="${base}/festivalact/detail?festivalActId=${c.objectId!}">活动</a>
                                    <#elseif c.objectType==1><a href="${base}/czjcommodity/detail.do?id=${c.objectId!}">商品</a>
                                </#if>

                            </#if>

                        </td>
                    <td> 
                            <#if c.joinlpk??>

                         <#if 1==c.joinlpk><span class="label label-success">是</span></#if>

                         <#if 0==c.joinlpk><span class="label label-default">否</span></#if>
                            </#if>
                    </td>
                        <td> 


                            <#if c.approveStatus??>
                                        <#if 0==c.approveStatus><span class="label label-default">审批中</span>

                                        <#elseif   1==c.approveStatus><span class="label label-success">审批通过</span>

                                        <#elseif 2==c.approveStatus><span class="label label-danger">审批不通过</span>

                                    </#if>

                            </#if>
                        </td>
                        <td><#if c.approveTime?? >${c.approveTime?string('yyyy-MM-dd HH:mm:ss')}</#if></td>
                        <td><#if c.createtime?? >${c.createtime?string('yyyy-MM-dd HH:mm:ss')}</#if></td>
                        <td class="label-hidden">${c.delFlag!}</td>

                <td>
                 <@shiro.hasPermission name="6.1.1">
                    <a href="${base}/czjcomments/detail2.do?commentsId=${c.commentsId!}" class="btn btn-primary btn-sm">详情</a>
                </@shiro.hasPermission>
                <@shiro.hasPermission name="6.1.2">
                    <a href="${base}/czjreply/list.do?commentsId=${c.commentsId!}" class="btn btn-primary btn-sm">回复信息</a>
               </@shiro.hasPermission>
                </td>
            </tr>


        </#list>
        </tbody>
    </table>



</div>
<script>

    function queryCondition(){
        var href = "";
        href+='content='+$('#content').val()+'&';
        href+='objectType='+$('#objectType').val()+'&';
        href+='joinlpk='+$('#joinlpk').val()+'&';
        href+='approveStatus='+$('#approveStatus').val()+'&';
        href+='approveTimeStart='+$('#approveTimeStart').val()+"&";
        href+='approveTimeEnd='+$('#approveTimeEnd').val()+'&';
        href+='createtimeStart='+$('#createtimeStart').val()+"&";
        href+='createtimeEnd='+$('#createtimeEnd').val();
        return href;
    }

</script>

</body>
</html>
